/* main.css */
@import './base.css';

/* 移动端适配基础 */
html {
  font-size: 14px; /* 可配合 rem 使用 */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
  Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0); /* 去除移动端点击高亮 */
  touch-action: manipulation; /* 提升触摸交互体验 */
  line-height: 1.5;
  width: 100%;
  overflow-x: hidden; /* 防止水平滚动 */
}

/* 清除默认 margin/padding */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 避免页面缩放问题 */
input,
textarea,
button {
  font-size: 1em; /* 防止 iOS 缩放 */
  -webkit-appearance: none; /* 去除浏览器默认样式 */
  outline: none;
}

/* App 容器适配 */
#app {
  max-width: 100%;
  margin: 0 auto;
  /*padding: 1rem;*/
  width: 100%;
}

@media (min-width: 768px) {
  #app {
    max-width: 768px;
    /*padding: 1.5rem;*/
  }
}

@media (min-width: 1024px) {
  body {
    display: flex;
    place-items: center;
  }

  #app {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /*padding: 2rem;*/
  }
}

/* 链接与按钮样式 */
a,
.green {
  text-decoration: none;
  color: hsla(160, 100%, 37%, 1);
  transition: background-color 0.3s ease;
  padding: 6px 12px;
  border-radius: 8px;
  display: inline-block;
}

@media (hover: hover) {
  a:hover {
    background-color: hsla(160, 100%, 37%, 0.2);
  }
}

/* 按钮通用样式 */
button,
button.green {
  font-size: 16px;
  padding: 10px 16px;
  border-radius: 8px;
  background-color: hsla(160, 100%, 37%, 1);
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover,
button.green:hover {
  background-color: hsla(160, 100%, 30%, 1);
}
.card {
  background-color: white;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 0 8px rgba(0, 0, 0, .12);
}